<?php



/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Game
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
 
 
 
class Game_Model_Favorite extends Core_Model_Item_Abstract
{
  // Properties

  protected $_parent_type = 'game';
  
  protected $_owner_type = 'user';

  protected $_searchTriggers = array();

  protected $game;
  
  public function getGame()
  {
    if (!($this->game instanceof Game_Model_Game))
    {
      $game = Engine_Api::_()->game()->getGame($this->game_id);
      if (!($game instanceof Game_Model_Game))
      {
        $game = new Game_Model_Game(array());
      }
      $this->game = $game;
    }

    return $this->game;
  }
}